<!TITLE>Different background image according to time of day
<!/TITLE>
<!DESCRIPTION>A simple script that changes the background image of the document four times a day, depending on the time period. The periods are : 12pm to 4am, 4am to 12am, 12am to 6pm, and 6pm to 12pm.
<!/DESCRIPTION>
<!CATEGORY>img and music effects<!/CATEGORY>
<!SCRIPT>
<!-- START OF SCRIPT -->
<script language="JavaScript">
<!-- Hide From Old Browsers
day=new Date() //..get the date
x=day.getHours() //..get the hour
if(x>=0 && x<4) {
document.write('<body background="put your first image file name here such as 1.jpg">')
} else
if(x>=4 && x<12) {
document.write('<body background="put your second image file name here such as 2.jpg">')
} else
if(x>=12 && x<18) {
document.write('<body background="put your third image file name here such as 3.jpg">')
} else
if (x>=18 && x<24) {
document.write('<body background="put your last image file name here such as 4.jpg">')
}
<!-- End Hiding -->
</script>
<!-- END OF SCRIPT -->
<!/SCRIPT>
<!PREVIEW>
<!-- START OF SCRIPT -->
<script language="JavaScript">
<!-- Hide From Old Browsers
day=new Date() //..get the date
x=day.getHours() //..get the hour
if(x>=0 && x<4) {
document.write('<body background="put your first image file name here such as 1.jpg">')
} else
if(x>=4 && x<12) {
document.write('<body background="put your second image file name here such as 2.jpg">')
} else
if(x>=12 && x<18) {
document.write('<body background="put your third image file name here such as 3.jpg">')
} else
if (x>=18 && x<24) {
document.write('<body background="put your last image file name here such as 4.jpg">')